<%--
  Created by IntelliJ IDEA.
  User: MACHENIKE
  Date: 2021/10/9
  Time: 9:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link href="bootstrap2.3.2/css/bootstrap.min.css" rel="stylesheet" />
    <title></title>
    <link href="styles/Common.css" rel="stylesheet" />
    <link href="styles/Index.css" rel="stylesheet" />
    <link href="styles/Index2.css" rel="stylesheet" />
</head>
<body>
<script type="text/javascript">
    //判断两次输入的密码是否一致
    function checkPsd() {
        if($("#newPassword").val()==$("#rePassword").val()){
            $("#Btn").removeAttr("disabled");
            $("#sp1").text("");
        }else{
            $("#sp1").text("两次输入的密码不一致").css("color","red");
            $("#Btn").attr("disabled",true);
        }
    }
    //检测原始密码输入是否正确
    function checkPassword() {
        if($("#oldPassword").val()==${user.uPassword}){
            $("#Btn").removeAttr("disabled");
            $("#sp2").text("");
        }else{
            $("#sp2").text("原始密码输入错误！！！").css("color","red");
            $("#Btn").attr("disabled",true);
        }
    }
</script>
<div class="header">

    <img class="logo" src="images/logo.png" />
    <label class="logo-title">通用后台模板</label>
    <ul class="inline">
        <li>
            <img src="images/32/client.png" />&nbsp;&nbsp;欢迎您${user.uAccount}
        </li>
        <li class="dropdown">
            <a class="dropdown-toggle mymsg" data-toggle="dropdown" href="#"><img src="images/32/166.png" />&nbsp;&nbsp;修改个人信息<b class="caret"></b></a>
            <ul class="dropdown-menu">
                <li><a href="password.jsp">修改密码</a></li>
            </ul>

        </li>
        <li>
            <img src="images/32/200.png" />&nbsp;&nbsp;<a class="loginout" href="login.jsp">退出</a>
        </li>

    </ul>


</div>


<div class="nav">

    <ul class="breadcrumb">
        <li>
            <img src="images/32/5025_networking.png" />
        </li>
        <li><a href="index.jsp">首页</a> <span class="divider">>></span></li>
        <li class="active">修改密码</li>
    </ul>
</div>



<div class="container-fluid content">
    <div class="row-fluid">
        <div class="span2 content-left">
            <div class="accordion">
                <div class="accordion-group">
                    <div class="accordion-heading">
                        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
                            <img class="left-icon" src="images/32/5026_settings.png" /><span class="left-title">系统设置</span>
                        </a>
                    </div>
                    <div id="collapseOne" class="accordion-body collapse in">
                        <div class="accordion-inner">
                            <a href="product?method=selectPage"> <img class="left-icon-child" src="images/32/4962_sitemap.png" /><span class="left-body"> 药品管理</span></a>
                        </div>

                        <div class="accordion-inner">
                            <a href="password.jsp">  <img class="left-icon-child" src="images/32/4992_user.png" /><span class="left-body"> 修改密码</span></a>

                        </div>
                        <div class="accordion-inner">
                            <a href="login.jsp">  <img class="left-icon-child" src="images/32/4958_login.png" /><span class="left-body"> 退出登陆</span></a>

                        </div>
                    </div>
                </div>
            </div>

        </div>

        <div class="span10 content-right">
            <div class="container-fluid">
                <div class="row" style="padding-top:20px" >

                    <form class="form-horizontal" action="user?method=updatePassword&uAccount=${user.uAccount}" method="post">
                        <div class="control-group">
                            <label class="control-label" for="userName">原始密码</label>
                            <div class="controls">
                                <input type="password" id="oldPassword" onchange="checkPassword()" placeholder="原始密码"><span id="sp2"></span>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"  for="Chinese">新密码</label>
                            <div class="controls">
                                <input type="password" id="newPassword" placeholder="新密码">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="Math">确认密码</label>
                            <div class="controls">
                                <input type="password" id="rePassword" name="rePassword" onchange="checkPsd()" placeholder="确认密码"><span id="sp1"></span>
                            </div>
                        </div>

                        <div class="control-group">
                            <div class="controls">
                                <input type="submit" class="btn btn-success" id="Btn" value="提交">
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>
<div class="clearfix"></div>
<div class="foot"></div>
<script src="scripts/jquery-1.9.1.min.js"></script>
<script src="bootstrap2.3.2/js/bootstrap.min.js"></script>
<script src="scripts/Index.js"></script>
<div style="text-align:center;">
    <p>来源:<a href="http://www.mycodes.net/" target="_blank">源码之家</a></p>
</div>

</body>
</html>
